package com.mf.pte.pojo;

import com.ptc.pfc.pfcBase.ActionListeners;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

@Getter
public class MyComponentLevel {


    private final List<MyComponent> componentsOnThisLevel;

    public MyComponentLevel( ) {
        this.componentsOnThisLevel = new ArrayList<>();
    }

    public void addMyComponentInThisLevel(MyComponent MyComponent){
        componentsOnThisLevel.add(MyComponent);
    }

    public MyComponent getByDrawNumber(String idKey){
        for(MyComponent component : componentsOnThisLevel){
            if(component.getIdKey().equals(idKey)){
                return component;
            }
        }
        return null;
    }


}
